﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Net;
using System.ServiceModel;
using Model;

namespace PositionServer.Service
{
    [ServiceContract]
    public interface IPositionService
    {

        /// <summary>
        /// return 1 means succeed 
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        int TestWCF();

       

        #region common Interface

         
        #endregion

        #region platform Interface

        [OperationContract]
        List<DeviceInfo> GetAllDeviceLocation();

        /// <summary>
        /// Verify client platform user name and password 
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        [OperationContract]
        bool CheckUser(string userName, string password);


        [OperationContract]
        UserInfo CheckUserWithReturn(string userName, string password);


        [OperationContract]
        bool ChangePassWordByUserName(string userName, string newPwd);

        [OperationContract]
        string GetClientVersion();

        [OperationContract]
        bool UserAdd(Model.UserInfo model);

        [OperationContract]
        bool UserUpdate(Model.UserInfo model);

        [OperationContract]
        bool UserDelete(int id);

        [OperationContract]
        bool UserDeleteList(string idlist);

        [OperationContract]
        DataSet UserGetList(string strWhere);

        [OperationContract]
        bool UserExist(string userName);


        [OperationContract]
        bool RoleUpdate(int id, string name, string permission, string remark);

        [OperationContract]
        string[] GetRoleInfoByUserName(string username);

        [OperationContract]
        bool RoleAdd(Model.RoleInfo model);
        //[OperationContract]
        //bool RoleUpdate(Model.RoleInfo model);

        [OperationContract]
        bool RoleDelete(int id);

        [OperationContract]
        bool RoleDeleteList(string idlist);

        [OperationContract]
        DataSet RoleGetList(string strWhere);

        [OperationContract]
        bool RoleExist(string roleName);

          

        [OperationContract]
        bool GmapoverlayAdd(Model.GmapoverlayInfo model);

        [OperationContract]
        bool GmapoverlayUpdate(Model.GmapoverlayInfo model);

        [OperationContract]
        bool GmapoverlayDelete(int id);

        [OperationContract]
        Model.GmapoverlayInfo GmapoverlayGetModel(int id);

        [OperationContract]
        DataSet GmapoverlayGetList(string strWhere);

        [OperationContract]
        DataSet GmapoverlayGetListByParameter(string parameter, string parameterVaule);

        [OperationContract]
        int GmapoverlayGetRecordCount(string strWhere);


        [OperationContract]
        DataSet DeviceGetList(string strWhere);

        [OperationContract]
        DataSet DeviceGpsHistoryGetList(string strEmi, 
            DateTime startTime, DateTime endTime);


        #endregion
    }
}
